import request from '@/utils/request'
import { info } from 'autoprefixer'

export function list(token, data) {
  console.log('------ activityData ---API ----->')
  console.log(data)
  return request({
    url: 'activity/activity/get_select',
    method: 'post',
    params: { token },
    data
  })
}

export function detail(token,data) {
  return request({
    url: 'activity/activity/detail',
    method: 'post',
    params: { token },
    data
  })
}

export function del(token,activity_id){
  return request({
    url: 'activity/activity/delete',
    method: 'post',
    params: {token},
    data: {activity_id}
  })
}

export function add(token,data) {
  return request({
    url: 'activity/activity/add',
    method: 'post',
    params: {token},
    data
  })
}


export function edit(token,data) {
  return request({
    url: 'activity/activity/edit',
    method: 'post',
    params: {token},
    data
  })
}

// 获取活动订单
// order/order/activity_total
export function getActivityOrder(token,data){
  return request({
    url: 'order/order/activity_total',
    method: 'post',
    params: {token},
    data
  })
}

export function getActivityCoupon(token,data){
  return request({
    url: 'activity/coupon/index',
    method: 'post',
    params: {token},
    data
  })
}


export function getActivityEmployee(token,data){
  return request({
    url: 'activity/activity/employee',
    method: 'post',
    params: {token},
    data
  })
}